/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/ccjzxyxt">ccjzxyxt</a> All rights reserved.
 */
package cn.net.dckj.modules.biz.entity;

import cn.net.dckj.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * 云服务器套餐设置Entity
 *
 * @author hqj
 * @version 2019-04-09
 */
@Entity
@Table(name = "biz_ecs_setting")
public class BizEcsSetting extends DataEntity<BizEcsSetting> {

    private static final long serialVersionUID = 1L;
    @Column(columnDefinition = "varchar(100) NOT NULL COMMENT '名称'")
    private String name;                // 名称
    @Column(name = "cpu_number", columnDefinition = "varchar(2) NOT NULL COMMENT 'cpu核心数'")
    private String cpuNumber;           // cpu核心数
    @Column(name = "ram_size", columnDefinition = "varchar(2) NOT NULL COMMENT '内存大小'")
    private String ramSize;             // 内存大小
    @Column(name = "storage_size", columnDefinition = "varchar(2) NOT NULL COMMENT '磁盘存储大小'")
    private String storageSize;        // 磁盘存储大小
    @Column(name = "use_time", columnDefinition = "decimal(5,0) NOT NULL COMMENT '使用天数'")
    private Integer useTime;            // 使用天数
    @Column(columnDefinition = "decimal(10,2) NOT NULL COMMENT '价格'")
    private Double price;               // 价格

    public BizEcsSetting() {
        super();
    }

    public BizEcsSetting(String id) {
        super(id);
    }

    @Length(min = 1, max = 100, message = "名称长度必须介于 1 和 100 之间")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Length(min = 1, max = 2, message = "cpu核心数长度必须介于 1 和 2 之间")
    public String getCpuNumber() {
        return cpuNumber;
    }

    public void setCpuNumber(String cpuNumber) {
        this.cpuNumber = cpuNumber;
    }

    @Length(min = 1, max = 2, message = "内存大小长度必须介于 1 和 2 之间")
    public String getRamSize() {
        return ramSize;
    }

    public void setRamSize(String ramSize) {
        this.ramSize = ramSize;
    }

    @Length(min = 1, max = 2, message = "磁盘存储大小长度必须介于 1 和 2 之间")
    public String getStorageSize() {
        return storageSize;
    }

    public void setStorageSize(String storageSize) {
        this.storageSize = storageSize;
    }

    @NotNull(message = "使用天数不能为空")
    public Integer getUseTime() {
        return useTime;
    }

    public void setUseTime(Integer useTime) {
        this.useTime = useTime;
    }

    @NotNull(message = "价格不能为空")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

}